//
//  VIZHomePageController.m
//  Young-Old
//
//  Created by 位立志 on 16/4/26.
//  Copyright © 2016年 位立志. All rights reserved.
//

#import "VIZHomePageController.h"


@interface VIZHomePageController ()

@property(nonatomic,weak)UIButton *warning;
@property(nonatomic,weak)UIButton *note;
@property(nonatomic,weak)UIButton *phone;

@end

@implementation VIZHomePageController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    //布局
    [self setUI];
    
}

- (void)setUI{
    
    
    
    //提醒
    UIButton *warning = [[UIButton alloc]init];
    [warning addTarget:self action:@selector(warningClick) forControlEvents:UIControlEventTouchUpInside];
    [warning setTitle:@"提醒" forState:UIControlStateNormal];
    self.warning = warning;
    [self.view addSubview:warning];
    warning.frame = CGRectMake(100, 200, 100, 50);
    warning.layer.cornerRadius = 25;
    warning.layer.masksToBounds = YES;
    warning.backgroundColor = [UIView randomColor];
    
    //随笔
    UIButton *note = [[UIButton alloc]init];
    [note addTarget:self action:@selector(noteClick) forControlEvents:UIControlEventTouchUpInside];
    [note setTitle:@"随笔" forState:UIControlStateNormal];
    self.note = note;
    [self.view addSubview:note];
    note.frame = CGRectMake(100, 250, 100, 50);
    note.layer.cornerRadius = 25;
    note.layer.masksToBounds = YES;
    note.backgroundColor = [UIView randomColor];
    
    //电话
    UIButton *phone = [[UIButton alloc]init];
    [phone addTarget:self action:@selector(phoneClick) forControlEvents:UIControlEventTouchUpInside];
    [phone setTitle:@"电话" forState:UIControlStateNormal];
    self.phone = phone;
    [self.view addSubview:phone];
    phone.frame = CGRectMake(100, 300, 100, 50);
    phone.layer.cornerRadius = 25;
    phone.layer.masksToBounds = YES;
    phone.backgroundColor = [UIView randomColor];
    
    
}


//提醒
- (void)warningClick{
    NSLog(@"提醒");
    
    //创建提醒控制器,modea跳转到waring控制器
    VIZWaringController *warning = [[VIZWaringController alloc]init];
    VIZNavgationController *warningNav = [[VIZNavgationController alloc]initWithRootViewController:warning];
    [self presentViewController:warningNav animated:YES completion:nil];
}

//电话
- (void)phoneClick{
    NSLog(@"电话");
}

//随笔
- (void)noteClick{
    
    NSLog(@"随笔");
}









- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}


@end
